'use strict';

const db = uniCloud.database();
const add_db = db.collection('appointment');
exports.main = async (event, context) => {
	const data = JSON.parse(event.data);
	let res = await add_db.doc(event.id).update({
		user: data[0].user,
		notes: data[1].notes,
		lfs: data[2].lfs,
		xm: data[3].xm,
		yyrq: data[4].yyrq,
		yysj: data[5].yysj,
		//create_time: new Date().getTime(),
	});
	return {
			code: 0,
			msg: '修改成功'
		}
};